using RStudio.UIFramwork;
using RStudio.UnitSingleton;


/// <Summary>
///
/// </Summary>
[UIDetail("PageUIController", "PageUIController")]
public class PageUIController : UIBase
{
	/// <Summary>
	/// 本地组件集
	/// </Summary>
	public DetailPageUIController Detail;
	

	public override void InitComponent()
	{
		Detail = new DetailPageUIController(transform);

		this.Detail.BTN_Btn_Click.onClick.AddListener(() =>
		{
			GameService.Instance.GetService<ServiceUI>().UIEnter.Close(this);
		});


        this.Detail.TextMeshProUGUI_Tooltip.text = $"{this.GetType().Name} | 功能详细：【关旧】{this.UseClosePrevious} 【可被关】{this.CanBeClosed}";

		this.Detail.TextMeshProUGUI_Content.text = "" +
			"<b>推荐调度方法</b>\n\n" +
			"new UIController().Open<T>() \n\n" +
			"此方法类集中处理更加详细具体的调度逻辑行为. 例如: " +
			"\n\n" +
            "new UIController().Close(Type type) \n" +
            "new UIController().Close(UIBase uiBase)\n" +
			"\n" +
			"其主要责任如下：\n" +
			"- 涵盖 开启/关闭/回滚 三类操作行为. \n" +
			"- 针对 单 UIBase 实例/同 Type 所有 UIBase 实例的管理模式. \n\n" +
			"使用中请注意！UIController 可以是一个, 也可以是多个!" +
			"\n通常情况下一个也足够使用了！";
    }
}
